<template>
  <div>
    <BusinessTable
      :book-title="bookTitle"
      :search-params="searchParams"
      :data-params="dataParams"
      :table-columns="tableColumns"
      :page-query-url="pageQueryUrl"
      :add-url="mergeUrl"
      :update-url="mergeUrl"
      :delete-url="deleteUrl"
    />
  </div>
</template>

<script>
  import BusinessTable from '@/components/BusinessTable';
  export default {
    name: 'config',
    components: { BusinessTable },
    data() {
      return {
        bookTitle: '流程配置',
        searchParams: [
          { key: 'name', tag: 'a-input', conf: { label: '名称', placeholder: '请输入流程名称' } },
          { key: 'code', tag: 'a-input', conf: { label: '编码', placeholder: '请输入流程编码' } },
          { key: 'version', tag: 'a-input-number', conf: { label: '版本' } },
        ],
        dataParams: [
          { key: 'name', tag: 'a-input', conf: { label: '名称', placeholder: '请输入流程名称' } },
          { key: 'code', tag: 'a-input', conf: { label: '编码', placeholder: '请输入流程编码' } },
          { key: 'version', tag: 'a-input-number', conf: { label: '版本' } },
        ],
        tableColumns: [
          {
            title: '名称',
            dataIndex: 'name',
            key: 'name',
          },
          {
            title: '编码',
            dataIndex: 'code',
            key: 'code',
          },
          {
            title: '版本',
            dataIndex: 'version',
            key: 'version',
          },
          {
            title: '创建人',
            dataIndex: 'createdBy',
            key: 'createdBy',
          },
          {
            title: '创建日期',
            dataIndex: 'creationDate',
            key: 'creationDate',
          },
          {
            title: '修改人',
            dataIndex: 'lastUpdatedBy',
            key: 'lastUpdatedBy',
          },
          {
            title: '修改日期',
            dataIndex: 'lastUpdateDate',
            key: 'lastUpdateDate',
          },
        ],
        pageQueryUrl: this.api.process.pageQueryProcessDefinition,
        mergeUrl: this.api.process.mergeProcessDefinition,
        deleteUrl: this.api.process.deleteProcessDefinition,
      };
    },
    methods: {},
  };
</script>

<style scoped></style>
